cmake_minimum_required(VERSION 3.13.0)
project(wbjson)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

option(GTEST_UNITTEST "Build Gtest unit test cases" ON)

find_package(Threads REQUIRED)

include_directories(
    ${PROJECT_SOURCE_DIR}/src
)

add_library(wbjson STATIC "")
add_subdirectory(src)

if(GTEST_UNITTEST)
    message("Build Gtest unit test cases")
    find_package(GTest REQUIRED)
    add_subdirectory(unit_test)
endif()